﻿<%@ include file="/WEB-INF/views/framework/global.jsp"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="${path}/static/stylesheets/default_theme/login.css" type="text/css" />
<title>开题报告</title>
</head>
<body class="kk">

<div class="framework_container">
      <a href="${reqRoot}/download">模板下载</a >
</div><!-- /framework_container -->

 <form:form modelAttribute="uploadItem" action="${reqRoot}/upload?showerror=true" name="frm" method="post" enctype="multipart/form-data">
 		${message}
		<fieldset>
			<legend>上传附件</legend>
			<table>
				<tr>
					<td><form:label for="fileData" path="fileData">File</form:label><br />
					</td>
					<td><form:input path="fileData" id="image" type="file" /></td>
				</tr>
				<tr>
					<td><br /></td>
					<td><input type="submit" value="上传" /></td>
				</tr>
			</table>
		</fieldset>
	</form:form>
<script src="${cmpRoot}/import_index.js"></script>
<script>
		var id = '${reportId}';
		// 创建功能
		$('#addBtn').click(function () {
			window.location.href = keter.reqRoot+'/add/';
		});
		
		$('#submitBtn').click(function () {
			if(window.confirm('确认提交？')){
				 $.ajax({
						url: keter.reqRoot + '/submit/'+id,
						contentType:'application/json',
						context: document.body,
						type:'POST'
					}).done(function(data){
						success(data,true);
					});
		        return true;
		     }else{
		        return false;
		    }			
		});


		// iframe的src的重定向
		(function () {
			var menuItems = $('.menu_item');
			menuItems.click(function (e) {
				stopDefault(e);
				var $this = $(this),
					href = $this.attr('href');
				iframe.src = href;
			});
		}) ();
	</script>
</body>
</html>
